[draft] support vscode extension debug#16080
Closed
rschnekenbu wants to merge 1 commit intomasterfrom
Closed
Conversation
remove usage from npm and try reuse current executable to trigger a second instance of theia based application.
tsmaeder
reviewed
Jul 30, 2025
| // according to process.argv documentation, the first argument is the path to the node executable | ||
| // and the second argument is the path to the script being executed | ||
| // second argument will be treated as the workspace location, so it should be ignored | ||
| if (index === 1 || arg.startsWith('--port') || args[index - 1] === '--port') { |
Member
There was a problem hiding this comment.
filter() expects a boolean return, unlike map()
Contributor
Author
|
Quick update on this task:
According to the documentation, we should be able to spawn a new backend if we provide a new electron user data area, but this is not sufficient. I tried also providing a theia config dir using some environment variables on the new spawned process, with no success. |
Member
|
Closing it for now and continue from here later when we revisit the topic. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Note: This PR is largely based on work done in the context of eclipsesource#96.
It tries to get away from using non-working npm based commands to debug vscode extensions from Theia (see https://github.com/eclipse-theia/theia-blueprint/issues/ 281 (remove the whitespace when doing the final PR))
How to test
To get the local build running, I had to adapt docker file with an updated node version (22) and updated the entrypoint as it was still on yarn (https://github.com/eclipse-theia/theia-ide/blob/046f5a2c6fa5f51ebe33750cec51b97ee9b6714c/docker/local-theia-build/entrypoint#L44)
You will need to slightly adapt the launch.json, due to other bugs. Comment out the preLaunchTask line
This is the part where it fails. A second window opens, but as the initial tool does not detect the start of the second app (looking for 'Theia app listening' pattern in logs), the debug session fails.
Follow-ups
I did not fully rework on the filtering mechanism as commented by Thomas on eclipsesource#96. The filtering is a kind of mess between args or undefined being returned instead of true/false for example.
Breaking changes
Attribution
Review checklist
Reminder for reviewers